Two-dimensional codes which represent data in the form of patterns have been widely used in recent years. Such a two-dimensional code contains a location symbol having a prescribed pattern so that the position of the two-dimensional code can be determined from the image from which the two-dimensional code has been read (for example, refer to Japanese Laid-open Patent Publication No. H07-254037).
A technique has also been developed for preventing secret information printed on a print medium from being seen. For example, in one proposed technique, an image that needs to be prevented from being seen by a person other than an authorized person is encrypted in advance, and the thus encrypted image is printed on a medium such as paper (for example, refer to Japanese Laid-open Patent Publication No. 2008-301044). An encryption device using the above proposed technique encrypts a selected region of an input image by changing the ordering of pixels in that region on a block-by-block basis in accordance with a prescribed encryption key. Further, the encryption device attaches a location marker for locating the encrypted region to at least two of the four corners of the encrypted region. The encryption device further attaches a checking marker which is used to verify the validity of the decrypted image obtained by decrypting the encrypted region. On the other hand, a decryption device, using a reading device such as a scanner or a digital camera, reads a medium on which the image having the encrypted region is printed and converts the image into electronic data. Then, the decryption device recovers the original image by decrypting the encrypted region by referring to the location markers on the image converted into electronic data form.
However, when an image of a medium with a two-dimensional code or encrypted image printed thereon is captured by a digital camera or a camera-equipped mobile phone, the captured image may be blurred due to being out of focus, or a blurred image due to camera shake may be superimposed on the captured image. If such a blurred image is superimposed on the captured image, the data represented by the two-dimensional code shown in the image may not be recoverable. If the data can be recovered, the quality of the image obtained by decrypting the encrypted image will be far short of that of the original image.
On the other hand, there is proposed a technique for evaluating, based on the edge enhancement or auto-correlation value obtained from a captured image, the amount of blurring or camera shake superimposed on the captured image (for example, refer to Japanese Laid-open Patent Publication Nos. 2000-18920 and 2006-172417).
However, the edge enhancement or auto-correlation value detected from the captured image can vary depending on the image printed on the medium from which the image was captured. It is therefore desirable to develop a technique in which the amount of blurring superimposed on the captured image can be detected, independently of the image printed on the medium.